import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JPanel;


public class SearchTRGui extends JPanel {
	int location;
	final JComboBox comboBox;
	User user = new User();
	public SearchTRGui() {
		setLayout(null);
		
		JButton btnNewButton = new JButton("Fill in");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				location = 3;
			}
		});
		btnNewButton.setBounds(6, 6, 117, 29);
		add(btnNewButton);
		
		 comboBox = new JComboBox();
		comboBox.setBounds(135, 6, 183, 20);
		add(comboBox);
		
		JButton btnGo = new JButton("Go");
		btnGo.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
			}
		});
		btnGo.setBounds(6, 47, 117, 29);
		add(btnGo);
		
		JButton btnNewButton_1 = new JButton("Back");
		btnNewButton_1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				location = -1;
			}
		});
		btnNewButton_1.setBounds(6, 86, 117, 29);
		add(btnNewButton_1);
	}
	
	


public int getLoc(){
    return location;
}

public void setLoc(int i){
    location = i;
}

public void setTreatmentRecords(User input){
	System.out.println(input.getTreatmentRecords().size() + " q !");
	for( int i = 0; i < input.getTreatmentRecords().size(); i++)
    {
		TreatmentRecord tr = input.getTreatmentRecords().get(i);
		if(tr == null){
		}else{
			comboBox.insertItemAt(input.getTreatmentRecords().get(i).getAttendingNurse(), i);
		}
    }
	}
}
